home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / tmidi211.zip / tmidigm.cmd < prev   
OS/2 REXX Batch file  |  1997-04-09  |  2KB  |  67 lines

  1. /* tmidi rexx caller for NN/2 helper */
  2.  
  3. /* On S keyhit or played-through-to-end midi file is saved to saveto path */
  4. /* To -not- save, press any key other than S/s before the end of play */
  5.  
  6. /*
  7.  * To setup Navigator:
  8.  *
  9.  *  Select OPTIONS/General preferences.../Helpers
  10.  *
  11.  *  If you do not already have a mid helper do the following:
  12.  *
  13.  *  1. Create New Type
  14.  *     a. MIME Type:    audio
  15.  *     b. MIME Subtype: midi
  16.  *
  17.  *  2. File extensions
  18.  *     Set to "mid"  (no dot, no quotes)
  19.  *
  20.  *  3. Action:
  21.  *     "Launch the Application"
  22.  *
  23.  *  4. In the entry field for the application, enter
  24.  *     "d:\path\tmidigm.cmd"  (use actual d:\path\)
  25.  *
  26.  *  5. Select OK
  27.  *
  28.  * You may need to repeat the procedure for File/MIME type of "audio/x-midi"
  29.  * since you may get this at some sites.  Enter the same data, except use
  30.  * "x-midi" in 1b.
  31.  *
  32.  */
  33.  
  34. /*
  35.  * This is not a plugin.  This is a helper (more reliable as far as the
  36.  * current NN goes).  Plus, it's very easy/simple to modify this file to
  37.  * suit whatever requirements you may have.
  38.  */
  39.  
  40. /* change the following: saveto, logfile, deftype to whatever you want */
  41.  
  42. saveto = "f:\mids\saves\"
  43. logfile = saveto||"saves.log"
  44. deftype = "-gm"
  45.  
  46. parse arg midifile
  47.  
  48. basefile = filespec("name",midifile)
  49. savefile = saveto||basefile
  50.  
  51. tmidi midifile deftype
  52. if rc = 255 then do
  53.    tStr = date('O') time('N') "Saving" savefile
  54.    say tStr
  55.    call lineout logfile,tStr
  56.  
  57.    "@"copy midifile savefile "> nul"
  58.    if rc <> 0 then call lineout logfile,"copy failed, err:" rc
  59.  
  60. end
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.